package com.zqx.visitor.client;

import com.zqx.visitor.abstractelement.Employee;
import com.zqx.visitor.abstractvisitor.Department;
import com.zqx.visitor.concreteelement.FulltimeEmployee;
import com.zqx.visitor.concreteelement.ParttimeEmployee;
import com.zqx.visitor.objectstruct.EmployeeList;
import com.zqx.visitor.utils.XMLUtil;

/**
 * description: 客户端测试类
 * @author zqx
 * @date 2018/09/06
 */
public class Client {
    public static void main(String[] args) {

        EmployeeList list = new EmployeeList();
        Employee zyn,zqx,zsf,zs,zq;
        //张玉娜，正式员工
        zyn = new FulltimeEmployee("张玉娜",3200.00,45);
        //张谦行，正式员工
        zqx = new FulltimeEmployee("张玉娜",2000.00,40);
        //张三丰，正式员工
        zsf = new FulltimeEmployee("张玉娜",2400,38);
        //张三，临时工
        zs = new ParttimeEmployee("张三",80.00,20);
        //张千，临时工
        zq = new ParttimeEmployee("张谦",60.00,18);

        list.addEmployee(zyn);
        list.addEmployee(zqx);
        list.addEmployee(zsf);
        list.addEmployee(zs);
        list.addEmployee(zq);

        Department dep;
        dep = (Department) XMLUtil.getBean();
        list.accpet(dep);


    }
}
